home *** CD-ROM | disk | FTP | other *** search
/ Artworx CD [Amiga] / Artworx CD - Amiga Version (Weird Science) (1995).iso / ecs / educaton / electronics / gifencod.lbm (.png) < prev    next >
IFF Interleaved Bitmap Image  |  1993-08-31  |  40KB  |  640x350  |  4-bit (4 colors)
Offensive: Gore: Very Likely
Labels: text | map
OCR: GIF Encoder Init encoder by Bob Montgomery 1-21-88 Notes: Get color Get 1st color parent = color Parent is 1st color 1. son is child[parent] 2. bro(ther) is sib[person] person = son or bro 3. nuc = next valid code Get color 4. Init encoder: son = child[parent] All children = 0 All sib(lings) = 0 Does parent have a son? Codesize = bits/pixel + 1 son Y Clear code = 1 << bits/pixel Is son right color? End code = clear code + 1 min code = end code + 1 "Create one <Shade[son] N max code = clear code << 1 child[parentJ = nvc - color shade[nvc] = color bro = son Makes loop easier putcode[parent] parent = color Does brother have a brother? nvc = nvc + 1 siblbro3 N Make new WY Get him parent bro = sib[bro] parent = son Change codesize Is he right color? if required "Shade[bro]>> Create one NE color2- sib[bro] = nvc Try other shade[nvc] = color brothers Y Make new putcode[parent] Parent parent = color parent = bro nuc = nvc + 1